import { RouteRecordRaw } from 'vue-router';
/**
 * meta : {
 title: '菜单名'
 icon: '菜单图标；根据自己的UI模板来定，用图标样式或者svg;留空则无'
 roles: '所需权限角色；根据自己的角色权限系统来配置角色名数组；为安全起见，留空则全部不可访问，设置了guest的才是允许游客访问的，设置了admin的是只允许admin访问的（优先级最高）'
 }
 */

const routes: Array<RouteRecordRaw> = [
  {
    path: '/:pathMatch(.*)*',
    component: () => import("@renderer/views/404.vue"),
    meta: {
      title: '错误页',
      icon: '',
      roles: ['guest']
    },
  },
  {
    path: '/',
    name: '总览',
    component: () => import('@renderer/views/LandingPage.vue'),
    meta: {
      title: '总览',
      icon: '',
      roles: ['guest']
    },
  },
  {
    path: '/landing',
    name: '着陆页',
    component: () => import('@renderer/views/LandingPage.vue'),
    meta: {
      title: '着陆页',
      icon: '',
      roles: ['guest']
    },
  },
  {
    path: '/Print',
    name: '打印',
    component: () => import('@renderer/views/Print.vue'),
    meta: {
      title: '打印演示',
      icon: '',
      roles: ['admin']
    },
  },
  {
    path: '/Browser',
    name: '浏览器',
    component: () => import('@renderer/views/Browser.vue'),
    meta: {
      title: '浏览器',
      icon: '',
      roles: ['admin', 'edit']
    },
  },
  {
    path: '/login',
    name: '登陆',
    component: () => import('@renderer/views/Login.vue'),
    meta: {
      title: '登陆',
      icon: '',
      roles: ['admin', 'guest']
    },
  },
  {
    path: '/403',
    component: () => import("@renderer/views/403.vue"),
    meta: {
      title: '403页',
      icon: '',
      roles: ['guest']
    },
  },
]

export default routes
